import { request, Api } from '@api'
export const FrameHub = {
  state: {
    data: 0,
  },
  reducers: {
    setData(state: any, payload: any) {
      return { ...state, data: payload }
    },
  },
  effects: (dispatch: any) => ({
    getList: async function (params: any) {
      const data = await request.post('/api/addComponent', params)
      console.log(data)
      // dispatch.FrameHub.setData(data)
    },
  }),
}
